using System.Collections;
using System.Collections.Generic;
using Unity.IO.LowLevel.Unsafe;
using UnityEngine;

public class EnemySkeleton : Enemy
{
    #region States

    public SkeletonIdelState idelState {  get; private set; }
    public SkeletonMoveState moveState { get; private set; }
    public SkeletonBattleState battleState { get; private set; }    

    public SkeletonAttackState attackState { get; private set; }
    public SkeletonStunnedState stunnedState { get; private set; }
    protected override void Awake()
    {
        base.Awake();
        idelState = new SkeletonIdelState(this, stateMachine, "Idle",this);
        moveState = new SkeletonMoveState(this,stateMachine,"Move",this);
        battleState = new SkeletonBattleState(this, stateMachine, "Move", this);
        attackState = new SkeletonAttackState(this, stateMachine, "Attack", this);
        stunnedState = new SkeletonStunnedState(this, stateMachine, "Stunned", this);
    }

    #endregion
    protected override void Start()
    {
        base.Start();
        stateMachine.Initialize(idelState);
    }

    protected override void Update()
    {
        base.Update();
        if(Input.GetKeyDown(KeyCode.X)) {
            stateMachine.ChangeState(stunnedState);
        }
    }
}

